---
image: /generated/articles-docs-lambda-disk-size.png
id: disk-size
title: Disk size
crumb: 'Lambda'
---

By default, each Lambda function comes with an ephemereal disk size of:

| Remotion Version | Default |
| ---------------- | ------- |
| &lt;5.0.0        | 2048MB  |
| &gt;=5.0.0       | 10240MB |

Increasing disk space will allow for longer videos, and speeds up renders because Chrome has access to more disk cache.  
Disk.

Adding more disk space will almost not affect the cost of your renders at all (less than 1% more cost).  
Therefore we recommend setting the disk size to the maximum possible value: 10240MB.

## Approximate maximum video length

Note that we recommend setting the disk size to the maximum possible value: 10240MB.

| Disk size | Approximate Maximum video length |
| --------- | -------------------------------- |
| 512 MB    | 8 min - 1080p                    |
| 1024 MB   | 16 min - 1080p                   |
| 2048 MB   | 32 min - 1080p                   |
| 4096 MB   | 1h 4min - 1080p                  |
| 8192 MB   | 2h 8min - 1080p                  |
| 10240 MB  | 2h 40min - 1080p                 |

> These are approximate values and will not exactly match your scenario. Video output size is dependant on the video content and audio. Measure and find the values that work best for you.

## Setting the disk size

- Use the [`diskSizeInMb` option of `deployFunction()`](/docs/lambda/deployfunction#disksizeinmb) to set the disk size when you deploy.
- Use the [`--disk`](/docs/lambda/cli/functions/deploy#--disk) flag if you use the `remotion lambda functions deploy` command.

## Pricing

Using more disk space costs marginally more.  
Setting the disk size to the maximum possible value: 10240MB will cost less than 1% more.  
See the [Lambda pricing page](https://aws.amazon.com/lambda/pricing/) "Lambda Ephemereal Storage Pricing" section for pricing.  
The [`estimatePrice()`](/docs/lambda/estimateprice) API does also factor disk size into account.
